package com.hmall.api.client.payorder;


import com.hmall.api.dto.PayOrderDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;


@FeignClient(value = "pay-service")
public interface PayorderClient {
    //通过api发起向pay service的请求  请求参数是订单id    希望返回的是payorder表的 支付状态或者全部数据
    @GetMapping("/pay-orders/{orderId}")
    PayOrderDto queryPayOrderById(@PathVariable("orderId") Long orderId);
    //取消订单  将状态设置为超时
    @PutMapping("/pay-orders/markPayOrderSuccess/{orderId}")
    void markPayOrderSuccess(@PathVariable("orderId") Long orderId);
}
